package com.sandau.b230111.b23011123.mapper;

import com.sandau.b230111.b23011123.model.Employee;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface EmployeeMapper {
//    @Select("select id, name, department from employee")
    List<Employee> findAll(Employee employee);
    @Delete("delete from employee where id=#{id}")
    void deleteById(String id);
    @Insert("insert into employee(id,name,department) values(#{id},#{name},#{department})")
    void save(Employee s);

    @Update("update employee set name = #{name}, department = #{department} where id = #{id}")
    void update(Employee s);

    @Select("select * from employee where id=#{id}")
    public Employee getReferenceById(String id);
}
